package com.dragon.flow.convert;

/**
 * @title: 基础的类转化器
 * @author: bruce.liu
 * @since: 2024/10/4 9:04
 */
import java.util.List;
import org.mapstruct.InheritConfiguration;
import org.mapstruct.InheritInverseConfiguration;

public interface BaseConvert<SOURCE, TARGET> {
    TARGET sourceToTarget(SOURCE source);

    @InheritConfiguration
    SOURCE targetToSource(TARGET target);

    List<TARGET> sourceToTarget(List<SOURCE> sources);

    @InheritInverseConfiguration
    List<SOURCE> targetToSource(List<TARGET> targets);
}
